package ar.edu.unq.mongodbexample.homes;

import java.util.List;

import com.mongodb.BasicDBObject;

/**
 * TODO: description
 */
public abstract class Home<T> {
    private Class<T> clazz;

    public void setClazz(final Class<T> clazz) {
        this.clazz = clazz;
    }

    public Class<T> getClazz() {
        return this.clazz;
    }

    public List<T> findEntity(final BasicDBObject query) {
        /*
         * FindCommand<T> cmd = new FindCommand<T>(this.getClazz()); cmd.setQuery(query);
         * MongoDBManager.getInstance().runCommand(cmd); return cmd.getResult();
         */
        return null;
    }

    public void saveEntity(final T entity) {
        /*
         * CreateCommand<T> cmd = new CreateCommand<T>(this.getClazz()); cmd.setEntity(entity);
         * MongoDBManager.getInstance().runCommand(cmd);
         */
    }
}
